package com.hungtrung.entity;

import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.math.Vector2;
import com.hungtrung.game.HungTrungGame;

public  class GiaCam extends Entity{
	public GiaCam(Texture texture, Vector2 pos, Vector2 direction) {
		super(texture, pos, direction);		
	}
	@Override
	public void update() {		
		float x = pos.x;// lay vi tri hien thoi cua gia cam
		//System.out.println(x);
		pos.add(direction);
		if(x>=HungTrungGame.WIDTH - 82) // gia cam chay het duong bien phai
			setPosition(-300, 0);
		if(x<0)
			setPosition(300, 0);		
			
	}
	//public void deTrung() 
}

